package com.cskaoyan.mall.dao;

import com.cskaoyan.mall.model.goods.*;
import com.cskaoyan.mall.model.message.Reply;
import com.cskaoyan.mall.model.message.ReplyMsgVO;
import com.cskaoyan.mall.model.orders.OrdersByStateVOInnerGoods;

import java.util.List;

/**
 * @author: jyf2000jyf
 */
public interface GoodsDao {
    List<Type> getType();

    List<GoodsByTypeVO> getGoodsByType(int typeId);

    boolean addGoods(Goods goods);

    int selectMaxGoodsId();

    boolean addSpecList(List<Spec> specList);

    boolean addType(Type type);

    boolean deleteGoodsById(int id);

    boolean deleteType(int typeId);

    boolean deleteGoodsByTypeId(int typeId);

    boolean deleteSpecByTypeId(int typeId);

    List<Spec> getSpecList(int goodsId);

    Goods getGoodsVOByGoodsId(int goodsId);

    boolean updateGoods(Goods goods, int goodsId);

    boolean deleteSpecByGoodsId(int goodsId);

    void updateStockNumAndPrice(int goodsId);

    boolean addSpec(Spec spec);

    boolean deleteSpec(Spec spec);

    List<ReplyMsgVO> getNoReplyMsg();

    List<ReplyMsgVO> getRepliedMsg();

    boolean reply(Reply replyContent);

    List<GoodsByTypeVO> getGoodsOrderByDesc();

    List<GoodsByNameVO> getGoodsByName(String goodsName);

    List<GoodsMsgVO> getGoodsMsg(Integer id);

    List<GoodsCommentVOInnerComment> getGoodsComment(Integer goodsId);

    boolean askGoodsMsg(AskGoodsMsg askGoodsMsg);

    String getGoodsNameByID(int id);

    OrdersByStateVOInnerGoods getGoodsBySpec(Integer goodsDetailId);
}
